<template>
    <div>
        <div class="question-type">
            <div class="question-type-name">
                <div class="f-fr">
                    <Button size="small" type="text">添加</Button>
                    <Button size="small" type="text">高级设置</Button>
                    <Button size="small" type="text">删除</Button>
                </div>
                <span>所属分类：</span>
            </div>
            <div class="question-numbers">
                <div class="question-item" v-for="(item, k) in questionType" :key="k">{{ item }}</div>
                <div class="question-item" v-for="(item, k) in form" :key="k">
                    <Input v-model="form[k]" size="small"></Input>
                    <span>（可选）</span>
                </div>
            </div>
        </div>
        <div class="question-type">
            <div class="question-type-name">
                <div class="f-fr">
                    <Button size="small" type="text">添加</Button>
                    <Button size="small" type="text">高级设置</Button>
                    <Button size="small" type="text">删除</Button>
                </div>
                <span>所属分类：</span>
            </div>
            <div class="question-numbers">
                <div class="question-item" v-for="(item, k) in questionType" :key="k">{{ item }}</div>
                <div class="question-item" v-for="(item, k) in form" :key="k">
                    <Input v-model="form[k]" size="small"></Input>
                    <span>（可选）</span>
                </div>
            </div>
        </div>
    </div>
</template>
<script>
import { questionType } from '@/libs/enums'
export default {
    data () {
        return {
            questionType,
            form: {
                field1: '',
                field2: '',
                field3: '',
                field4: ''
            }
        }
    }
}
</script>
<style lang="less" scoped>
.question-type {
    padding: 15px;
    border: 1px solid #eee;
    & + & {
        margin-top: 15px;
    }
}
.question-numbers {
    border-top: 1px solid #eee;
    border-left: 1px solid #eee;
}
.question-type-name {
    margin-bottom: 10px;
}
.question-item {
    padding: 8px;
    width: 25%;
    display: inline-block;
    border-right: 1px solid #eee;
    border-bottom: 1px solid #eee;
    .ivu-input-wrapper {
        width: 100px;
    }
}
</style>
